#pragma once
#include<mysql/mysql.h>
#include<iostream>
#include<string>
#include<stdio.h>
#include<vector>
using namespace std;

struct user_info{
	int id;
	string name;
	int age;
	string gender;
};

class mySQLHelper{
public:
    mySQLHelper();
    ~mySQLHelper();
public: 
    bool insert_info(user_info &user_in);
    bool update_info(user_info &user_in);
    bool delete_info(user_info &user_in);
    vector<user_info> query_info();



private:
    MYSQL conn;//数据库连接对象
    const char* host = "127.0.0.1";
    const char* user = "root";
    const char* password  = "Dzg1314520";
    const char* db_name = "project_c_sql";


};